﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Wix.Aura.Common {
	public class ComplianceCheck : IXmlSerializable {

		public ComplianceCheck() {
			ComponentSearch = new List<ComponentSearch>();
			RegistrySearch = new List<RegistrySearch>();
			IniFileSearch = new List<IniFileSearch>();
			DirectorySearch = new List<DirectorySearch>();
		}

		public ComplianceDrive ComplianceDrive { get; set; }
		public ICollection<ComponentSearch> ComponentSearch { get; private set; }
		public ICollection<RegistrySearch> RegistrySearch { get; private set; }
		public ICollection<IniFileSearch> IniFileSearch { get; private set; }
		public ICollection<DirectorySearch> DirectorySearch { get; private set; }

		public System.Xml.Schema.XmlSchema GetSchema() {
			throw new NotImplementedException();
		}

		public void ReadXml(System.Xml.XmlReader reader) {
			throw new NotImplementedException();
		}

		public void WriteXml(System.Xml.XmlWriter writer) {
			writer.WriteStartElement("ComplianceCheck");
			if (ComplianceDrive != null)
				ComplianceDrive.WriteXml(writer);
			writer.WriteElements(ComponentSearch);
			writer.WriteElements(RegistrySearch);
			writer.WriteElements(IniFileSearch);
			writer.WriteElements(DirectorySearch);
			writer.WriteEndElement();
		}
	}
}
